<script type="text/javascript">
    Util.on_load(function() {
        skip_dirty_stop = false;
        jQuery('#<%= scope[:form_id] %>').dirty_form();
        jQuery('a:not(.skip_dirty_stop)').  dirty_stopper({ dialog : {title : "Unsaved Changes", height: 80}, message : "There are unsaved changes on your form. 'Proceed' will discard these changes."});
        jQuery(window).resize(function() {
            jQuery(".ui-dialog-content") && jQuery(".ui-dialog-content").dialog("option", "position", "center");
        });
    });
</script>
